<template>
  <div>
    <edit-layout v-if="opt == 'edit'" @changeView="changeView"></edit-layout>
    <view-layout v-if="opt == 'view'" @changeView="changeView"></view-layout>
  </div>
</template>

<script>
import EditLayout from '@/views/index/edit.vue'
import ViewLayout from '@/views/index/view.vue'

export default {
  data () {
    return { 
      opt: 'view'
    }
  },
  methods: {
    // 编辑界面跳转
    changeView(opt) {
      this.opt = opt;
    }
  },
  created () {
  },
  components: {
    EditLayout,
    ViewLayout
  }
}

</script>

<style>
.vue-grid-item .el-card__header {
    padding: 15px 18px !important;
}
</style>
